Skip to content

Instantly share code, notes, and snippets.

@justindell
justindell / claude_rubocop_hook.json
Last active July 4, 2025 03:06
Using Claude Code Hooks to automatically run rubocop --auto-correct on Ruby files
"hooks": {
"PostToolUse": [
{
"matcher": "Edit|Write",
"hooks": [
{
"type": "command",
"command": "FILE_PATH=$(jq -r '.tool_input.file_path // empty'); if [[ \"$FILE_PATH\" =~ \\.(rb|rake)$|Rakefile$|Gemfile$ ]]; then echo \"Running RuboCop on $FILE_PATH\"; bundle exec rubocop --autocorrect \"$FILE_PATH\"; fi"
}
]
@frozenpandaman
frozenpandaman / widevine-decryption.md
Last active July 4, 2025 02:57
download videos protected with widevine DRM
@doshiraki
doshiraki / toggle_mount.sh
Created April 19, 2025 21:25
bash for remount when adb remount fails because permission or read-only.
#!/system_ext/bin/bash
# toggle_mount.sh: Toggles specified Device Mapper device(s) between read-only (ro) and read-write (rw) on Pixel 7a (LineageOS)
# Usage:
# Single device: toggle_mount <device> <ro|rw> (e.g., toggle_mount system_a rw)
# All system/product/vendor: toggle_mount --all rw
# Features: Compares dmctl table before/after; converts multiple devices to rw
# Disclaimer: Feel free to use it at your own discretion and responsibility.
# Move to a safe directory
@cablej
cablej / default.md
Created June 21, 2025 18:46
Cluely System prompt

<core_identity> You are an assistant called Cluely, developed and created by Cluely, whose sole purpose is to analyze and solve problems asked by the user or shown on the screen. Your responses must be specific, accurate, and actionable. </core_identity>

<general_guidelines>

  • NEVER use meta-phrases (e.g., "let me help you", "I can see that").
  • NEVER summarize unless explicitly requested.
  • NEVER provide unsolicited advice.
  • NEVER refer to "screenshot" or "image" - refer to it as "the screen" if needed.
  • ALWAYS be specific, detailed, and accurate.
@tuxuser
tuxuser / xbl_oauth2.py
Created September 2, 2020 09:15
Sign in to Xbox Live with OAUTH2
"""
Sign in to Xbox Live with OAUTH2
1. Go to https://portal.azure.com/#blade/Microsoft_AAD_RegisteredApps/ApplicationsListBlade
2. Register new app ("+ New registration")
2.1. Enter a name for your app
2.2. Set "Supported account types" to "Personal Microsoft accounts only"
2.3. Click register
2.4. Choose "Redirect URIs" -> "Add a Redirect URI"
2.5. Click "Add a platform" -> "Mobile and desktop applications"
@cmcdevitt
cmcdevitt / jelly_example_one.xml
Created November 23, 2018 01:50
UI Page Jelly Example One
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<!-- NOTE the tag attributes VALUES must be wraped in a string: foo='bar' OR foo='${"bar"}' -->
<!-- JELLY set tag, Attributes "var,value" -->
<j:set var='jvar_somevar' value='100'/>
<!-- This is a comment -->
<p>This is html ${" and JEXL"} AND $[" SN JEXL!"]</p>
trigger:
- master
pr:
- master
# I really like date based version numbers. It wouldn't work for external facing software, but
# this is an enterprise app
name: $(Date:yyyy.MM.dd)$(Rev:.r)
@wsuff
wsuff / amucfg.py
Last active July 4, 2025 01:48
amucfg.py: Automating AI Model Metadata for Aider with OpenRouter
import requests
import json
import os
import time
import yaml
import argparse
import re
from datetime import datetime
OPENROUTER_API_BASE = "https://openrouter.ai/api/v1"
@BlockmanCodes
BlockmanCodes / .env
Created August 31, 2023 22:30
Uniswap V3 / EthersJS: decode mempool swap router swaps
WEBSOCKET_URL=wss://mainnet.infura.io/ws/v3/abc
@githubfoam
githubfoam / windows event logs cheat sheet
Last active July 4, 2025 01:44
windows event logs cheat sheet
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
# PS : ChatGPT makes mistakes, consider "trust but verify" principle
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
#Events to Monitor
https://learn.microsoft.com/en-us/windows-server/identity/ad-ds/plan/appendix-l--events-to-monitor
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
#run
eventvwr.msc Event viewer
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Event Viewer(Local)-Windows Logs (shutdown / restart )